<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/1/27 0027
  Time: 14:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<html>
<head>
    <title>Title</title>
    <script src=" webjars/jquery/3.5.1/jquery.js"></script>
    <script src="webjars/bootstrap/4.5.3/js/bootstrap.js"></script>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/manager.css"/>
    <script type="text/javascript">
        $(function(){
            $(".hosp_title").click(function(){
                $(".menu1").slideToggle("slow");
                if($(".pick1").text() == "▼"){
                    $(".pick1").text("▶");
                }else{
                    $(".pick1").text("▼");
                }
                $(".msg").css("display","none");
            });

            $(".doc_title").click(function(){
                $(".menu2").slideToggle("slow");
                if($(".pick2").text() == "▼"){
                    $(".pick2").text("▶");
                }else{
                    $(".pick2").text("▼");
                }
                $(".msg").css("display","none");
            });

            $(".rost_title").click(function(){
                $(".menu3").slideToggle("slow");
                if($(".pick3").text() == "▼"){
                    $(".pick3").text("▶");
                }else{
                    $(".pick3").text("▼");
                }
                $(".msg").css("display","none");
            });

            /* 显示药品 */
            $(".medicine_title").click(function(){
                $(".menu4").slideToggle("slow");
                if($(".pick4").text() == "▼"){
                    $(".pick4").text("▶");
                }else{
                    $(".pick4").text("▼");
                }
                $(".msg").css("display","none");
            });

            /* 显示医院类型管理页面 */
            $(".hosp_type").click(function(){
                $(".msg").css("display","none");
                $(".hospital_manager").css("display","block");
                $(".titText").css("font-weight","400");
                $(this).css("font-weight","600");
            })

            /* 显示医院介绍页面 */
            $(".hosp_msg").click(function(){
                $(".msg").css("display","none");
                $(".intr_info").css("display","block");
                $(".titText").css("font-weight","400");
                $(this).css("font-weight","600");
            })

            /* 显示科室管理页面 */
            $(".hosp_dept").click(function(){
                $(".msg").css("display","none");
                $(".dept_manager").css("display","block");
                $(".titText").css("font-weight","400");
                $(this).css("font-weight","600");
            })

            /* 显示医生类别页面 */
            $(".doc_type").click(function(){
                $(".msg").css("display","none");
                $(".docType_manager").css("display","block");
                $(".titText").css("font-weight","400");
                $(this).css("font-weight","600");
            })

            /* 显示医生信息页面 */
            $(".doc_msg").click(function(){
                $(".msg").css("display","none");
                $(".doc_Info").css("display","block");
                $(".titText").css("font-weight","400");
                $(this).css("font-weight","600");
            })

            /* 显示排班页面 */
            $(".rost_exp").click(function(){
                $(".msg").css("display","none");
                $(".doc_duty").css("display","block");
                $(".titText").css("font-weight","400");
                $(this).css("font-weight","600");
            })
            /* 显示药品列表 */
            $(".medicine_msg").click(function(){
                $(".msg").css("display","none");
                $(".medicine_Info").css("display","block");
                $(".titText").css("font-weight","400");
                $(this).css("font-weight","600");
            })
            /* 显示药品类型 */
            $(".medicine_tp").click(function(){
                $(".msg").css("display","none");
                $(".medicine_type").css("display","block");
                $(".titText").css("font-weight","400");
                $(this).css("font-weight","600");
            })

            /* 添加 */
            // 隐藏、显示弹框
            $(".insertBtn").click(function() {
                $(".addrow").toggle();
            });

            /* 修改 */
            // 隐藏、显示弹框
            $(".updateBtn").click(function() {
                $(".addrow").toggle();
            });

            // 点击除按钮和弹框之外任意地方隐藏弹窗
            $("body").click(function (e) {
                if (!$(e.target).closest(".insertBtn,.addrow,.updateBtn").length) {
                    $(".addrow").hide();
                }
            });

            /* 提交 */
            $(".addrow_submit").click(function(){
                $(".addrow").hide();
            })

            /* 取消 */
            $(".addrow_reset").click(function(){
                $(".addrow").hide();
            })

            /* 添加医院简介 */
            $(".insertIntrBtn").click(function() {
                $(".addInfo").toggle();
            });

            // 点击除按钮和弹框之外任意地方隐藏弹窗
            $("body").click(function (e) {
                if (!$(e.target).closest(".insertIntrBtn,.addInfo,.updateIntrBtn").length) {
                    $(".addInfo").hide();
                }
            });

            /* 修改医院简介 */
            $(".updateIntrBtn").click(function() {
                $(".addInfo").toggle();
            });

            /* 新增医生信息 */
            $(".docInsert").click(function() {
                $(".addmsg").toggle();
            });

            // 点击除按钮和弹框之外任意地方隐藏弹窗
            $("body").click(function (e) {
                if (!$(e.target).closest(".docInsert,.addmsg,.docUpdate").length) {
                    $(".addmsg").hide();
                }
            });

            /* 修改医生信息 */
            $(".docUpdate").click(function() {
                $(".addmsg").toggle();
            });

            /* 添加排班信息 */
            $(".scheInsert").click(function() {
                $(".sche_info").toggle();
            });

            // 点击除按钮和弹框之外任意地方隐藏弹窗
            $("body").click(function (e) {
                if (!$(e.target).closest(".scheInsert,.sche_infoUl,sche_tab,.scheUpdate").length) {
                    $(".sche_info").hide();
                }
            });

            /* 修改医生信息 */
            $(".scheUpdate").click(function() {
                $(".sche_info").toggle();
            });

            /* 添加药品 */
            $(".medInsert").click(function() {
                $(".addmedicine").toggle();
            });

        })
    </script>
    <style>
        ul li{
            list-style: none;
            text-align: center;
        }
    </style>
</head>
<body>
<!-- 医生信息 -->
<div class="right_msg">
<div class="doc_Info msg">
    <span class="docInfo_title titl">医生信息</span>

    <button type="button" class="btn insert_docInfo docInsert addBtn">添加</button>
    <button type="button" class="btn update_docInfo docUpdate modBtn">修改</button>
    <button type="button" class="btn delete_docInfo delBtn">删除</button>
    <button type="button" class="btn enable_docInfo enaBtn">启用</button>
    <button type="button" class="btn disable_docInfo disBtn">禁用</button>

    <input type="text" name="id" class="docInfo_input sel" placeholder="医生编号"/>
    <button type="button" class="btn select_docInfo selBtn">查询医生</button>

    <table class="docInfo_tab">
        <tr>
            <th>序号</th>
            <th>医生姓名</th>
            <th>电话</th>
            <th>邮箱</th>
            <th>性别</th>
            <th>年龄</th>
            <th>状态</th>
        </tr>
        <c:forEach items="${doctor}" var="d">
            <tr>
                <td><input type="checkbox" name="" />${d.dId}</td>
                <td>${d.dName}</td>
                <td>${d.dTel}</td>
                <td>${d.dEmail}</td>
                <td>${d.dSex}</td>
                <td>${d.dAge}</td>
                <td><c:if test="${d.dStatus == 0}">禁用</c:if> <c:if test="${d.dStatus == 1}">启用</c:if> </td>
            </tr>
        </c:forEach>
    </table>
</div>
</div>
<!-- 添加医生信息 -->
<div class="addmsg">
    <ul class="addmsgUl1">
        <li>姓名: <input type="text" class="docName" placeholder="请输入姓名"/></li>
        <li class="docSex">
                性别:<input type="radio" name="sex" value="" checked/>男
            <span><input type="radio" name="sex" value=""/>女</span>
        </li>
        <li>年龄: <input type="text" class="docAge" placeholder="请输入年龄"/></li>
    </ul>
    <ul class="addmsgUl2">
        <li>电话: <input type="tel" class="docTel" placeholder="请输入电话"/></li>
        <li>邮箱: <input type="email" class="docEmail" placeholder="请输入邮箱"/></li>
        <li>状态:
            <select class="docStatus" name="">
                <option value="">在职</option>
                <option value="">离职</option>
            </select>
        </li>
    </ul>

    <button type="button" class="doc_submit">提交</button>
    <button type="button" class="doc_reset">取消</button>

</div>
</body>
</html>
